Databases - SQL - Relational

Prototype

  • DrawSQL .

  • Pink | Aqua green:

    • I have something.

  • Aqua green:

    • Collection.

  • Yellow:

    • I am contained in something.

  • .

General

  • .

Prototyping
Normalization
Driver
  • A database driver  (or simply “driver”) is a library that allows applications to interact directly with a database. It acts as a bridge between the application and the database, managing communication and translating the requests made in the application code into commands that the database can understand and process.

  • The driver handles opening the connection, sending commands, and interpreting responses.

  • Using a driver eliminates the need to manually deal with network connections or the internal data structure of the database.

SQLite

About
  • Docs .

  • Open-source.

  • SQLite is a lightweight, self-contained, embedded DBMS that uses SQL to manage data.

  • It differs from other DBMSs because it is stored directly in a file on the system.

  • It does not require a separate server to function.

  • Ideal for mobile applications and small projects that do not require high concurrency.

  • Not recommended for large databases with high read/write demand due to performance limitations.

.db format
  • It is a binary file.

  • “SQLite was not designed to function as a client-server database. It is an embedded database, meaning each game instance would have its own copy of the .db  file, making state synchronization between players difficult.”

Client: DB Browser
Godot
  • SQLite for Godot .

    • Godot SQLite .

    • The video is unnecessarily long.

    • No complex queries or advanced Foreign Key usage are explained. It is extremely simple. The most complex example is a Join.

MySQL

Client
  • Usually used via MySQL Workbench, which basically acts as a terminal where all code must be typed.

  • .

MariaDB

  • MariaDB .

  • Open-source.

  • Fork of MySQL.

  • MySQL Compatibility :

    • MariaDB is designed to be compatible with MySQL in terms of commands, libraries, APIs, and database files. This facilitates migration of projects using MySQL to MariaDB.

Client
  • Usually used via MySQL Workbench, which basically acts as a terminal where all code must be typed.

Godot
  • Godot MariaDB .

    • Not properly updated.

    • (2024-12-11) Latest version is for Godot 4.1.3.

PostgreSQL

Client
  • Used through ‘pgAdmin’, which opens in the browser.

Godot
  • “As GDScript supports HTTP Web requests, it is possible to use the PostgREST API in front of the database. Then use HTTP Web requests to access the data and get the result in JSON format.”

  • PostgreSQLClient .

    • It is a driver for Godot 3.

    • “Samuel said he stopped working on this and the repo will be archived. SSL doesn’t work in the alpha branch (relevant for Godot 4.x projects).”

  • (2024-12-11) I searched and found no driver for Godot 4. Apparently, C# is used for the connection.

Oracle

  • Not  open-source.

  • Supports large corporate databases, scalable, feature-rich.

SQL Server

  • Not  open-source.

  • Microsoft’s DBMS, integrated with Microsoft products, widely used.